package com.Alan.pojo;

import com.Alan.util.UtilsAlan;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.junit.Test;

import java.sql.Date;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;

/**
 * @CreateDate 2021/8/9 2:30
 */
@ToString
public class User {
    @Getter @Setter private Integer id;
    @Getter @Setter private String userCode;
    @Getter @Setter private String userName;
    @Getter @Setter private String userPassword;
    @Getter @Setter private String gender;
    @Getter @Setter private Date birthday;
    @Getter @Setter private String phone;
    @Getter @Setter private String address;
    @Getter @Setter private Integer userRole;
    @Getter @Setter private String createdByUserName;
    @Getter @Setter private String createdByUserCode;
    @Getter @Setter private Date creationDate;
    @Getter @Setter private String modifyByUserName;
    @Getter @Setter private String modifyByUserCode;
    @Getter @Setter private Date modifyDate;

//    年龄
    private Integer age;
//    用户角色
    @Getter @Setter private String userRoleName;


    public Integer getAge() {
        return UtilsAlan.getAge(birthday).get("year");
    }
}
